<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
<script type='text/javascript'
	src='/static/js/jquery.js'></script>
<script type="text/javascript">
	function conform() {
		var outTradeNo = $("#out_trade_no").val();
		var amount = $("#amount").val();
		var fee = $("#fee").val();
		var nickName = $("#nick_name").val();
		var returnUrl = $("#return_url").val();
		var adviceUrl = $("#advice_url").val();
		var remark = $("#remark").val();
		$.post("/user/all", {
			method : "all",
			outTradeNo : outTradeNo,
			amount : amount,
			fee : fee,
			nickName : nickName,
			returnUrl : returnUrl,
			adviceUrl : adviceUrl,
			remark : remark
		}, function(json) {
			if (1 == json.status) {
				$("#signInfo").val(json.singInfo);
				$("#chargeForm").submit();
			} else {
				alert('提交失败');
			}
		}, "json");

	};
</script>
</head>
<body>
	<form id="chargeForm"
		action="http://test.yemadai.com/hostingRecharge_mobile" method="post">
					<table width="18%" border="0" align="center" cellpadding="0"
						   cellspacing="0">
						<tr>
							<td height="20"><input value="1005893" type="hidden"
					name="number_id"></input></td>
			</tr>
			<tr>
				<td height="20">商户订单号</td>
				<td height="20"><input id="out_trade_no" value="122222222227"
					type="text" name="out_trade_no"></input></td>
			</tr>
			<tr>
				<td height="20">金额</td>
				<td height="20"><input id="amount" value="100.00" type="text"
					name="amount"></input></td>
			</tr>
			<tr>
				<td height="20">手续费</td>
				<td height="20"><input id="fee" value="0" type="text"
					name="fee"></input></td>
			</tr>
			<tr>
				<td height="20">昵称</td>
				<td height="20"><input id="nick_name" value="过峰" type="text"
					name="nick_name"></input></td>
			</tr>
			<tr>
				<td height="20">页面返回</td>
				<td height="20"><input id="return_url" value="" type="text"
					name="return_url"></input></td>
			</tr>
			<tr>
				<td height="20">服务器返回</td>
				<td height="20"><input id="advice_url" value="" type="text"
					name="advice_url"></input></td>
			</tr>
			<tr>
				<td height="20">备注</td>
				<td height="20"><input id="remark" value="" type="text"
					name="remark"></input></td>
			</tr>
			<tr>
				<td height="20"><input id="signInfo" value="" type="hidden"
					name="sign_info"></input></td>
			</tr>
			<tr>
				<td height="20"></td>
				<td height="20">
					<button type="button" onclick="conform()">提交</button>
				</td>

			</tr>
		</table>
	</form>
</body>
</html>